import request from '@/config/axios'

export const updateMyselfApi = (data: UpdateMyselfRequest) => {
	return request.post<UpdateMyselfResponse | undefined>({
		url: '/system/sys-myself/updateMyself',
		data
	})
}

export const updateMyPasswordApi = (data: UpdateMyPasswordRequest) => {
	return request.post({
		url: '/system/sys-myself/updateMyPassword',
		data
	})
}

export const drawDownMqApi = (userId: number) => {
	return request.delete({
		url: '/system/sys-myself/drawDownMq/' + userId
	})
}

export const sendActivateEmailApi = (data: SendActivateEmailRequest) => {
	return request.post({
		url: '/system/sys-myself/sendActivateEmail',
		data
	})
}

export const getEmailStatusByUserIdApi = (userId: number) => {
	return request.get<MailBoxStatusResponse>({
		url: '/system/sys-myself/getEmailStatusByUserId/' + userId
	})
}

export const modifyEmailNotifyTypesApi = (data: ModifyEmailNotifyTypesRequest) => {
	return request.post<SysUser>({
		url: '/system/sys-myself/modifyEmailNotifyTypes',
		data
	})
}
